<extend name="Base/common"/>
<block name="style">
<link href="__CSS__/lyz.calendar.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	p{
		width: 90%;
		height: 45px;
		margin-left: 5%;
		margin-top:10px; 

	}
	p span{
		width: 25%;
		height: 45px;
		background: #EDEDED;
		border:1px solid #ccc;
		border-right: none;
		line-height: 45px;
		text-align: center;
		float: left;
	}
	p input{
		width: 65%;
		height: 45px;
		line-height: 45px;
		background: #fff;
		float: left;
		border:1px solid #ccc;
	}
	p select{
		width: 50%;
		height: 45px;
		background: #fff;
		float: left;
		border:1px solid #ccc;
	}
	p button{
		width: 25%;
		height: 45px;
		background: #EDEDED;
		border:1px solid #ccc;

		border-left: none;
		float: left;
	}

	table{

	font-size: 12px;

	font-family: "微软雅黑", "宋体", "Arial Narrow";
	
	}
	table th{
	padding:0px;
	border:none;
	}
	table td{
	padding:0px;
	
	}
	.table{
		font-size: 12px;
		text-align: center;
		line-height: 30px;

	}

		.top .line{
		width: 100%;
		height: 0px;
		border-bottom: 1px dashed #999;
		margin-left: 0;
		margin-top:0px; 
	}
	.top .text{
		width: 100%;
		height: 30px;
		margin-top:0px; 
		margin-left: 0;
		line-height: 30px;
	}
	.top{
		width: 90%;
		height:auto;
		margin-left: 5%;
		margin-top:3px;
		border-left:1px dashed #999;
		border-right:1px dashed #999;
		margin-bottom: 1%;
	}
</style>
<script src="http://www.jq22.com/jquery/1.4.4/jquery.min.js"></script>

<script src="__JS__/lyz.calendar.min.js" type="text/javascript"></script>
</block>
<block name="body">

	<div class="top">
		<p class="line"></p>
		<p class="text"> &nbsp;交易量：{$total}</p>
		<p class="line"></p>
		<p class="text"> &nbsp;成功量：{$success}</p>
		<p class="line"></p>
		<p class="text"> &nbsp;失败量：{$defeat}</p>
		<p class="line"></p>
		<p class="text"> &nbsp;交易成功总金额： {$money}</p>
		<p class="line"></p>

	</div>

		<form action="" method="post">
			<p>
				<span>开始日期</span>
				<input id="txtBeginDate" name="start_time"  style="width:65%;padding:7px 10px;border:1px solid #ccc;margin-right:10px;"/>
			</p>
			<p>
				<span>截止日期</span>
				<input id="txtEndDate" name="died_time" style="width:65%;padding:7px 10px;border:1px solid #ccc;" />
			</p>
			<p>
				<span>支付单号</span>
				<input type="text" name="danhao" placeholder="请输入完整的交易单号">
				
			</p>
			<p>
				<span>状态</span>
				<select name="status">
					<option value="-1">全部</option>
					<option value="1">成功</option>
					<option value="0">失败</option>
				</select>
				<button type="submit" class="">搜索</button>
				
			</p>
		</form>

<div style="width:90%;margin:auto;margin-top:5%">
	<empty name="list">
		<table class="table" width="100%" border="1" bordercolor="#EDEDED" cellspacing="0" cellpadding="0" >
			<thead bgcolor="#F8F8FF" style="font-weight: 900;">
				<tr height="30">
					<td>交易单号</td>
					<td>金额</td>
					<td>时间</td>
					<td>状态</td>
				</tr>
			</thead>
			<tbody>
				<tr height="30">
					<td colspan="3">暂无内容</td>
					
				</tr>
			</tbody>


		</table>

	<else/>
		<table class="table" width="100%" border="1" bordercolor="#EDEDED" cellspacing="0" cellpadding="0" >
			<thead bgcolor="#F8F8FF" style="font-weight: 900;">
				<tr height="30">
					<td>交易单号</td>
					<td>金额</td>
					<td>时间</td>
					<td>状态</td>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr height="30" style="font-size:11px;">
						<td ><php>echo '***'.substr($vo['out_biz_no'], -10);</php></td>
						<td>{$vo.money}</td>
						<td>{$vo.time|date='Y-m-d H:i:s',###}</td>
						<td><php>if($vo['status']==1){
								echo "成功";
							}elseif($vo['status']==0){
								echo "失败";
					}</php></td>
					</tr>
				</foreach>
			</tbody>


		</table>

	</empty>
	

<div class="page"  style="float:left;width:auto;height:30px;opacity:1;position:relative">{$_page}</div>
</div>
		

<!-- 			<input type="button" id="test" value="测试"> -->


		

</block>



<block name="script">

<script>

$('.search_btn').click(function(){
	var data=$('form').serializeArray();
	$.ajax({
		type:'post',
		data:data,
		url:"{:U('dingdan')}",
		success:function(m){
			alert(m)
		}
	})

})
	// $('#test').click(function(){
	// 	popup.alert(0)
	// 	$.ajax({
	// 		type:'get',
	// 		url:"{:U('cardbin')}",
	// 		success:function(m){
	// 			// popup.alert(m)
	// 		}
	// 	})
	// })




</script>



<script>

    $(function () {

        $("#txtBeginDate").calendar({

            controlId: "divDate",                                 // 弹出的日期控件ID，默认: $(this).attr("id") + "Calendar"

            speed: 200,                                           // 三种预定速度之一的字符串("slow", "normal", or "fast")或表示动画时长的毫秒数值(如：1000),默认：200

            complement: true,                                     // 是否显示日期或年空白处的前后月的补充,默认：true

            readonly: true,                                       // 目标对象是否设为只读，默认：true

            upperLimit: new Date(),                               // 日期上限，默认：NaN(不限制)

            lowerLimit: new Date("2011/01/01"),                   // 日期下限，默认：NaN(不限制)

            callback: function () {                               // 点击选择日期后的回调函数

                // alert("您选择的日期是：" + $("#txtBeginDate").val());

            }

        });

        $("#txtEndDate").calendar();

    });

</script>
	
</block>